cmake_minimum_required(VERSION 2.8)
project(xh_coroutine)

set(Boost_USE_STATIC_LIBS        OFF)
find_package(Boost REQUIRED context)

include_directories(${Boost_INCLUDE_DIRS})
include_directories(".")
aux_source_directory(${PROJECT_SOURCE_DIR} CO_SRC_LIST)


if(WIN32)
	link_directories(${BOOST_LIBRARYDIR})
else()
	add_definitions("--std=c++11 -g")
	set(LINK_LIBS "-lboost_context -lboost_system -lpthread")
endif()

add_executable(xh_coroutine ${CO_SRC_LIST})

if(WIN32)
else()
  target_link_libraries(xh_coroutine ${LINK_LIBS} -ldl)
endif()


